#include <QCoreApplication>
#include <iostream>
#include <conio.h>
using namespace std;

void fun(int *x, int *y)
{
 int p;
 p = *x;
 *x = *y;
 *y = p;
 cout <<"Znacheniya byli izmeneny" << endl;
}

int main()
{
 int x = 1, y = 2;
 int *px = &x, *py = &y;
 cout << "x = " << x << endl;
 cout << "y = " << y << endl;
 fun(px, py);
 cout << "x = " << x << endl;
 cout << "y = " << y << endl;
 getch();
 return 0;
}
